package com.beigai.imessage.dao.mapper.ext;

import com.beigai.imessage.dao.mapper.UserPOMapper;
import com.beigai.imessage.user.dto.UserFriend;
import com.beigai.imessage.user.dto.UserInfo;
import com.beigai.imessage.user.dto.UserSignToken;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by xxl on 2017/5/16.
 */
@Mapper
public interface UserPOMapperExt extends UserPOMapper {
    @Select({
            "SELECT " +
                    "   id,nickname, username,code " +
                    " FROM" +
                    " USER a " +
                    " WHERE a.`username` = #{username,jdbcType=VARCHAR} " +
                    " AND a.`password` = #{password,jdbcType=VARCHAR}"
    })
    UserInfo selectByCondition(UserSignToken token);

    List<UserFriend> selectBatchByCodes(List<String> friendCodes);
}
